package com.boot.dog.rest.core;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.boot.dog.common.util.ApiResult;
import com.boot.dog.entities.ao.LogAo;
import com.boot.dog.entities.pojo.Log;
import com.boot.dog.service.LogService;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: MaxLv
 * @Date: 2020/1/15
 */
@RestController
@RequestMapping("core/log")
@AllArgsConstructor
public class LogRest {

    private final LogService logService;

    @GetMapping("/getLogs")
    @ApiOperation(value = "操作日志分页查询")
    public ApiResult<IPage<Log>> getLogs(Page page, LogAo ao) {
        return logService.getLogs(page, ao);
    }
}